added some development tools
[windows-sources.git] / developer / Samples / NET 4.6 / Famliy_Tree_DSL / DslPackage / Backup / GeneratedCode / ModelExplorerToolWindow.cs
blob57a6eaa91661a37338b18947c54bc0faf90183b0
1 //------------------------------------------------------------------------------
2 // <auto-generated>
3 // This code was generated by a tool.
4 //
5 // Changes to this file may cause incorrect behavior and will be lost if
6 // the code is regenerated.
7 // </auto-generated>
8 //------------------------------------------------------------------------------
9 using DslModeling = global::Microsoft.VisualStudio.Modeling;
10 using DslShell = global::Microsoft.VisualStudio.Modeling.Shell;
12 namespace Fabrikam.Dsl.TestValidation
14 /// <summary>
15 /// Double-derived class to allow easier code customization.
16 /// </summary>
17 [global::System.Runtime.InteropServices.Guid(Constants.TestValidationModelExplorerToolWindowId)]
18 internal partial class TestValidationExplorerToolWindow : TestValidationExplorerToolWindowBase
20 /// <summary>
21 /// Constructs a new TestValidationExplorerToolWindow.
22 /// </summary>
23 public TestValidationExplorerToolWindow(global::System.IServiceProvider serviceProvider)
24 : base(serviceProvider)
29 /// <summary>
30 /// Model explorer tool window class.
31 /// </summary>
32 internal abstract class TestValidationExplorerToolWindowBase : DslShell::ModelExplorerToolWindow
34 /// <summary>
35 /// Constructor.
36 /// </summary>
37 /// <param name="serviceProvider">Service provider.</param>
38 protected TestValidationExplorerToolWindowBase(global::System.IServiceProvider serviceProvider)
39 : base(serviceProvider)
43 /// <summary>
44 /// Specifies a resource string that appears on the tool window title bar.
45 /// </summary>
46 public override string WindowTitle
48 get
50 global::System.Resources.ResourceManager resourceManager = global::Fabrikam.Dsl.TestValidation.TestValidationDomainModel.SingletonResourceManager;
51 return resourceManager.GetString("ModelExplorerTitle");
55 /// <summary>
56 /// Resource ID from VSPackage.resx containing the Model Explorer icon.
57 /// </summary>
58 protected override int BitmapResource
60 get
62 return 104;
66 /// <summary>
67 /// Index of tool window icon in BitmapResource.
68 /// </summary>
69 protected override int BitmapIndex
71 get { return 0; }
74 /// <summary>
75 /// Creates the model explorer to be hosted in the window.
76 /// </summary>
77 /// <returns>ModelExplorerTreeContainer</returns>
78 protected override DslShell::ModelExplorerTreeContainer CreateTreeContainer()
80 return new TestValidationExplorer(this);
83 /// <summary>
84 /// Called when selection changes in this window.
85 /// </summary>
86 /// <remarks>
87 /// Overriden to update the F1 help keyword for the selection.
88 /// </remarks>
89 /// <param name="e"></param>
90 protected override void OnSelectionChanged(global::System.EventArgs e)
92 base.OnSelectionChanged(e);
94 if(global::Fabrikam.Dsl.TestValidation.TestValidationHelpKeywordHelper.Instance != null)
96 DslModeling::ModelElement selectedElement = this.PrimarySelection as DslModeling::ModelElement;
97 if(selectedElement != null)
99 string f1Keyword = global::Fabrikam.Dsl.TestValidation.TestValidationHelpKeywordHelper.Instance.GetHelpKeyword(selectedElement);
100 if (!string.IsNullOrEmpty(f1Keyword) && this.SelectionHelpService != null)
102 this.SelectionHelpService.AddContextAttribute(string.Empty, f1Keyword, global::System.ComponentModel.Design.HelpKeywordType.F1Keyword);